/**
 * @description 商品下架
 */

import request from '@/utils/request'

/**
 * @description 获取商品下架单
 * @param {} data
 * @returns
 */
export const fetchGoodsRemovalList = (data) => {
  return request({
    url: '/dealer/pzGoodsstopmJxs/getPzGoodsstopmJxsList',
    method: 'post',
    data,
  })
}

/**
 * @description 保存商品下架单据
 */
export const saveGoodsRemoval = (data) => {
  return request({
    url: '/dealer/pzGoodsstopmJxs/saveGoodsstopmJxs',
    method: 'post',
    data,
  })
}

/**
 * @description 查看商品下架单
 */
export const fetchGoodsRemovalById = (goodsstopmJxsId) => {
  return request({
    url: `/dealer/pzGoodsstopmJxs/viewGoodsstopmJxs?goodsstopmJxsId=${goodsstopmJxsId}`,
    method: 'post',
  })
}

/**
 * @description 删除商品下架单
 */
export const deleteGoodsRemoval = (goodsstopmJxsId) => {
  return request({
    url: `/dealer/pzGoodsstopmJxs/deleteGoodsstopmJxs`,
    method: 'post',
    data: { goodsstopmJxsId },
  })
}

/**
 * @description 获取我自己在线的商品
 */
export const fetchMyOnlineGoods = (data) => {
  return request({
    url: '/dealer/pzDealerGoodsStore/getDealerGoodsStoreListForOnLine',
    method: 'post',
    data,
  })
}
